<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="Tronke.Ajax.js"></script>

</head>
<body>
<form id="myform">
    <input type="text" name="uname" value="abc">
    <input type="text" name="pwd" value="123">
    <input type="button" value="登录" id="btn">
</form>
</body>
</html>
<script>
    //    http://10.36.132.104/userinfo/login
    //    参数：LoginName
    //    LoginPwd
    //    如果成功  {status：true}
    var oForm = document.getElementById('myform');
    document.getElementById('btn').onclick = function(){
        var userName = oForm.uname.value;
        var userPwd = oForm.pwd.value;
        ajax({
            url : "http://10.36.132.104/userinfo/login",
            type : "post",
            async:"true",
            data : {
                "LoginName" : userName,
                "LoginPwd" : userPwd
            },
            dataType : "json",
            success : function(result){
                console.log(result);
                window.location.href="列表页面.html"
            }
        });

    }

</script>